<?php 
namespace App\Models\Business;

// 引入模块
use Illuminate\Database\Eloquent\Model;
use App\Traits\SerializeDate;

/**
 * 用户消费记录表数据模型
 */
class Record extends Model
{
    use SerializeDate;
    // 设置当前模型对应的完整数据表名称
    protected $table = 'business_record';

    protected $dateFormat = 'U';
    // 定义创建时间的字段
    const CREATED_AT = 'createtime';

    const UPDATED_AT = null;

    //允许批量赋值
    protected $guarded = [];

    protected $casts = [
        'createtime'   => 'datetime:Y-m-d H:i:s'
    ];
}